package com.lxq.dao;

import com.lxq.dao.common.BaseDao;
import com.lxq.entity.Card;

/**
 * @author HR
 *
 */
public interface CardDao extends BaseDao<Card>{
	
	/**
	 * 通过卡号查找卡
	 * @param cardNumber
	 * @return Card
	 */
	abstract public Card findByCardNumber(String cardNumber);
	/**
	 * 通过卡号更新余额
	 * @param cardNumber
	 * @param currentBalance
	 * @return boolean
	 */
	abstract public boolean updateCurrentBalance(String cardNumber, String currentBalance);
	/**
	 * 通过卡号更新卡状态
	 * @param cardNumber
	 * @param newState
	 * @return boolean
	 */
	abstract public boolean updateCardState(String cardNumber, int newState);
}
